package co.sanduche.util;

import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
import com.android.volley.VolleyError;

public abstract class EPCallback<T> implements Listener<T>, ErrorListener {

	@Override
	public void onErrorResponse(VolleyError e) {
		onFailure(e);
	}

	@Override
	public void onResponse(T arg0) {
		onSuccess(arg0);

	}

	public abstract void onSuccess(T data);

	public void onFailure(Throwable e) {
		e.printStackTrace();
	}

}
